/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "venderdetails")
@XmlRootElement(name = "venderdetails")
@NamedQueries({
    @NamedQuery(name = "Venderdetails.findAll", query = "SELECT v FROM Venderdetails v"),
    @NamedQuery(name = "Venderdetails.findByVenderID", query = "SELECT v FROM Venderdetails v WHERE v.venderID = :venderID"),
    @NamedQuery(name = "Venderdetails.findByVenderdescription", query = "SELECT v FROM Venderdetails v WHERE v.venderdescription = :venderdescription"),
    @NamedQuery(name = "Venderdetails.findByIsdeleted", query = "SELECT v FROM Venderdetails v WHERE v.isdeleted = :isdeleted"),
    @NamedQuery(name = "Venderdetails.findByDeleteddate", query = "SELECT v FROM Venderdetails v WHERE v.deleteddate = :deleteddate"),
    @NamedQuery(name = "Venderdetails.findByLastupdationdate", query = "SELECT v FROM Venderdetails v WHERE v.lastupdationdate = :lastupdationdate")})
public class Venderdetails implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "VenderID")
    private Long venderID;
    @Column(name = "venderdescription")
    private String venderdescription;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    @Column(name = "deleteddate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date deleteddate;
    @Column(name = "lastupdationdate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastupdationdate;
    @JoinColumn(name = "vendertype_VenderTypeID", referencedColumnName = "VenderTypeID")
    @ManyToOne(optional = false)
    private Vendertype vendertype;
    @JoinColumn(name = "person_PersonID", referencedColumnName = "PersonID")
    @ManyToOne(optional = false)
    private Person person;
    @JoinColumn(name = "employee_EmployeeID_deletedby", referencedColumnName = "EmployeeID")
    @ManyToOne
    private Employee employee;
    @JoinColumn(name = "employee_EmployeeID_updatedby", referencedColumnName = "EmployeeID")
    @ManyToOne
    private Employee employee1;

    public Venderdetails() {
    }

    public Venderdetails(Long venderID) {
        this.venderID = venderID;
    }

    public Long getVenderID() {
        return venderID;
    }

    public void setVenderID(Long venderID) {
        this.venderID = venderID;
    }

    public String getVenderdescription() {
        return venderdescription;
    }

    public void setVenderdescription(String venderdescription) {
        this.venderdescription = venderdescription;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Date getDeleteddate() {
        return deleteddate;
    }

    public void setDeleteddate(Date deleteddate) {
        this.deleteddate = deleteddate;
    }

    public Date getLastupdationdate() {
        return lastupdationdate;
    }

    public void setLastupdationdate(Date lastupdationdate) {
        this.lastupdationdate = lastupdationdate;
    }

    public Vendertype getVendertype() {
        return vendertype;
    }

    public void setVendertype(Vendertype vendertype) {
        this.vendertype = vendertype;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public Employee getEmployee1() {
        return employee1;
    }

    public void setEmployee1(Employee employee1) {
        this.employee1 = employee1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (venderID != null ? venderID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Venderdetails)) {
            return false;
        }
        Venderdetails other = (Venderdetails) object;
        if ((this.venderID == null && other.venderID != null) || (this.venderID != null && !this.venderID.equals(other.venderID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Venderdetails[venderID=" + venderID + "]";
    }

}
